<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'client-area-profile-form',
    //'action' => '/main/ajax/contactJoin',
    'enableClientValidation' => true,
    'htmlOptions' => array('class' => 'form', 'novalidate' => 'novalidate'),
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
        ));
?>
<div>
    <?php echo $form->error($model, 'user_fname'); ?>
    <?php echo $form->error($model, 'user_lname'); ?>
    <?php echo $form->error($model, 'user_email'); ?>
    <?php echo $form->error($model, 'user_phone'); ?>
    <?php echo $form->error($model, 'user_password'); ?>
    <?php echo $form->error($model, 'confirm_password'); ?>
    <?php echo $form->error($model, 'user_group'); ?>
</div>
<div id="client-area-profile-inner">
    <div class="input-container">
        <?php echo $form->textField($model, 'user_fname', array('placeholder' => 'Имя', 'class' => 'text-field')); ?>       
        <label for="client-name" class="for-input">Напишите имя</label>
    </div>
    <div class="input-container">
        <?php echo $form->textField($model, 'user_lname', array('placeholder' => 'Фамилия', 'class' => 'text-field')); ?>        
        <label for="client-surname" class="for-input">Напишите Вашу фамилию</label>
    </div>
    <div class="input-container">
        <?php echo $form->textField($model, 'user_email', array('placeholder' => 'email@ya.ru', 'class' => 'text-field')); ?>        
        <label for="client-email" class="for-input">Напишите Ваш email</label>
    </div>
    <div class="input-container">
        <?php echo $form->textField($model, 'user_phone', array('placeholder' => '+7 (XXX) YYY-YYYY', 'class' => 'text-field')); ?>        
        <label for="client-phone" class="for-input">Напишите Вашего телефон</label>
    </div>
    <div class="input-container">
        <div class="select-style w220px">
            <?php echo $form->dropdownList($model, 'promo_code', CHtml::listData(Promocodes::model()->findAll(), 'id', 'title'), array('placeholder' => 'Промокод', 'class' => 'select-styled w240px')); ?>            						
        </div>
        <label for="tow-type" class="for-select">Промокод</label>
    </div>
    <div class="input-container">
        <?php echo $form->passwordField($model, 'user_password', array('placeholder' => 'Пароль', 'class' => 'text-field')); ?>        
        <label for="client-phone" class="for-input">Введите пароль</label>
    </div>
    <div class="input-container">
        <?php echo $form->passwordField($model, 'confirm_password', array('placeholder' => 'Подтвердите пароль', 'class' => 'text-field')); ?>        
        <label for="client-phone" class="for-input">Подтвердите пароль</label>
    </div>    
    <?php echo $form->hiddenField($model, 'user_group', array('value' => 'user')); ?>        

</div>
<div id="client-area-profile-bottom">
    <?php //echo CHtml::submitButton('ЗАРЕГИСТРИРОВАТЬСЯ', array('class'=>'single-button', 'id'=>'submit')); ?>
    <button class="single-button" id="submit" type="submit"><?php echo $model->isNewRecord ? 'ЗАРЕГИСТРИРОВАТЬСЯ' : 'Сохранить'; ?></button>
</div>
<?php $this->endWidget(); ?>